  function errorHandler(error){
        var aConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
        aConsoleService.logStringMessage("Spiderpig: error: " + error + "line: " + error.lineNumber);
    }

    function logHandler(logdata){
        var aConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
        aConsoleService.logStringMessage("info: " + logdata);
        sp.addToLogTree(logdata);
    }

